package cn.zymall.user.mapper;

import cn.zymall.common.model.Admin;
import cn.zymall.common.model.Permissions;
import cn.zymall.common.model.RolePermissions;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;


/**
 * @Author 欧泽昌
 * @Description //(Permission)表数据库访问层
 * @Date 2020/8/22 15:14
 * @Param
 * @return
 **/
@Mapper
public interface PermissionMapper extends BaseMapper<Permissions> {

	/**
	 * @Author 欧泽昌
	 * @Description // 查询全部权限
	 * @Date 2020/8/25 16:01
	 * @Param []
	 * @return java.util.List<cn.zymall.common.model.Permissions>
	 **/
	public List<Permissions> queryAll();

	/**
	 * @Author 欧泽昌
	 * @Description // 新增权限 返回新增对象id
	 * @Date 2020/8/25 16:01
	 * @Param []
	 * @return java.util.List<cn.zymall.common.model.Permissions>
	 **/
	public int insertPermissions(@RequestBody Permissions bean);


	/**
	 * @Author 欧泽昌
	 * @Description // 批量修改权限状态
	 * @Date 2020/8/25 16:01
	 * @Param []
	 * @return java.util.List<cn.zymall.common.model.Permissions>
	 **/
	public int batchUpdate(List<Permissions> list);

	/**
	 * @Author 欧泽昌
	 * @Description //根据名称模糊查询
	 * @Date 2020/8/25 16:03
	 * @Param [name]
	 * @return java.util.List<cn.zymall.common.model.Permissions>
	 **/
	public List<Permissions> queryName(String name);
}
